﻿@model PersonInfoViewModel

<div id="personInfoContainer" class="personInfo" data-not-found="@(Model==null)">
	<div id="imageContainer">
		@if (Model != null && Model.PhotoID != null)
		{
			<img src="@Url.Action("GetImage", "Image", new { ID = Model.PhotoID })" alt="Person image" />
		}
		else
		{
			<img src="@Url.Content("~/Content/Images/no_user_photo_available.png")" alt="No image"/>
		}
	</div>
	
	<div id="personContacts">
		@if (Model != null)
		{
			<div id="personName">@Model.CommonName</div>
			<div id="workPosition">@Model.Position</div>
			<div id="location">Location: @Html.GenerateLocationString(Model)</div>
			<div id="workStation">Workstation: @Model.Workstation</div>
			<div id="voip">Epam Internal ext.: @Model.VOIPID</div>
			<div id="email">Email: @Html.GenerateMailto(Model.Email)</div>
		}
		else
		{
			<div id="personName">No Person</div>
		}
	</div>
</div>